local function set_model()
local model = {}
model[1]= "models/player/Group01/Female_01.mdl"
model[2]= "models/player/Group01/Female_02.mdl"
model[3]= "models/player/Group01/Female_03.mdl"
model[4]= "models/player/Group01/Female_04.mdl"
model[5]= "models/player/Group01/Female_06.mdl"
model[6]= "models/player/Group01/Female_07.mdl"
model[7]= "models/player/Group01/Male_01.mdl"
model[8]= "models/player/Group01/male_02.mdl"
model[9]= "models/player/Group01/male_03.mdl"
model[10]= "models/player/Group01/Male_04.mdl"
model[11]= "models/player/Group01/Male_05.mdl"
model[12]= "models/player/Group01/male_06.mdl"
model[13]= "models/player/Group01/male_07.mdl"
model[14]= "models/player/Group01/male_08.mdl"
model[15]= "models/player/Group01/male_09.mdl"
model[16]= "models/player/Group03/Female_01.mdl"
model[17]= "models/player/Group03/Female_02.mdl"
model[18]= "models/player/Group03/Female_03.mdl"
model[19]= "models/player/Group03/Female_04.mdl"
model[20]= "models/player/Group03/Female_06.mdl"
model[21]= "models/player/Group03/Female_07.mdl"
model[22]= "models/player/Group03/Male_01.mdl"
model[23]= "models/player/Group03/male_02.mdl"
model[24]= "models/player/Group03/male_03.mdl"
model[25]= "models/player/Group03/Male_04.mdl"
model[26]= "models/player/Group03/Male_05.mdl"
model[27]= "models/player/Group03/male_06.mdl"
model[28]= "models/player/Group03/male_07.mdl"
model[29]= "models/player/Group03/male_08.mdl"
model[30]= "models/player/Group03/male_09.mdl"
	
	local frame = vgui.Create("DFrame")
	local IconList = vgui.Create("DPanelList", frame ) 
 
	frame:Center()
	frame:SetSize(400,400)
	frame:SetTitle("player model")
	frame:MakePopup()
 
 	IconList:EnableVerticalScrollbar(true) 
 	IconList:EnableHorizontal(true) 
 	IconList:SetPadding( 4 ) 
	IconList:SetPos(10,30)
	IconList:SetSize(400, 460)
 
	for k,v in pairs(model) do
	local icon = vgui.Create( "SpawnIcon", IconList ) 
	icon:SetModel( v )
 	IconList:AddItem( icon )
	icon.DoClick = function( icon ) surface.PlaySound( "ui/buttonclickrelease.wav" ) datastream.StreamToServer("set_model", {["model"]= v }) end 
	end
return	
end

usermessage.Hook("set_model",function ()
set_model()
end)





































